定制 jn-devops/properties 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jn-devops/properties

最新稳定版本:v1.5.15

Composer 安装命令:

composer require jn-devops/properties

包简介

Homeful Properties Package

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Description

The Homeful Property Package is designed to manage real estate properties, including attributes, associated projects, and product mappings. It provides structured data models for properties and projects, enabling efficient data handling for property listings and transactions.

This package provides:

  • Property attribute management
  • Project association and housing type categorization
  • Product SKU linking for inventory tracking
  • Market segment classification for property valuation

Features

🏠 Property Management

  • Define essential property attributes such as block, lot, phase, and building details
  • Assign unit type, floor area, and house specifications (e.g., roof style, veranda, balcony)

🏗 Project Association

  • Link properties to specific projects using project codes
  • Store project details such as name, location, address, and company affiliation

📦 Product Integration

  • Associate properties with product SKUs
  • Maintain a direct relationship between properties and inventory management

🏡 Housing & Market Segments

  • Categorize properties under different Housing Types (Single Detached, Condominium, etc.)
  • Classify properties under Market Segments (Socialized, Economic, etc.)

Installation

To install via Composer, run:

composer require jn-devops/property

Usage

🔹 Creating a Property Instance

use Homeful\Properties\Models\Property;

$property = Property::create([
    'code' => 'PROP001',
    'name' => 'Sample Property',
    'type' => 'Residential',
    'cluster' => 'Cluster A',
    'phase' => 'Phase 1',
    'block' => 'Block 2',
    'lot' => 'Lot 5',
    'floor_area' => 60.0,
    'lot_area' => 80.0,
    'unit_type' => 'Townhouse',
]);

🔹 Associating a Property with a Project

use Homeful\Properties\Models\Project;

$project = Project::create([
    'code' => 'PROJ001',
    'name' => 'Sunrise Estates',
    'location' => 'Sta. Rosa City, Laguna',
    'company_code' => 'RLI'
]);

$property->project()->associate($project);
$property->save();

🔹 Linking a Product SKU

use Homeful\Products\Models\Product;

$product = Product::create([
    'sku' => 'PROD123',
    'name' => 'Modern House Model'
]);

$property->product()->associate($product);
$property->save();

🔹 Retrieving Property Data

use Homeful\Properties\Data\PropertyData;

$propertyData = PropertyData::fromModel($property);

Testing

Run the tests with:

composer test

Author

License

This package is open-source software licensed under the MIT License. See the License File for details.

统计信息

  • 总下载量: 3.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-11