--- options: collate: utf8_czech_ci charset: utf8 Estate: actAs: Timestampable: ~ Sluggable: fields: [name] unique: true builder: ['saInflector', 'urlize'] columns: category_id: { type: integer, notnull: true } sub_category_id: { type: integer, notnull: false } type_id: { type: integer, notnull: true } change_user_id: { type: integer, notnull: true } broker_user_id: { type: integer, notnull: false } building_type_id: { type: integer, notnull: false } building_condition_id: { type: integer, notnull: false } object_type_id: { type: integer, notnull: false } price_unit_id: { type: integer, notnull: true } ownership_id: { type: integer, notnull: false } name: { type: string(255), notnull: true } description: { type: clob } price: { type: double, notnull: true } region_code: { type: integer, notnull: false } district: { type: string(255), notnull: true } district_code: { type: integer, notnull: false } city: { type: string(255), notnull: true } city_code: { type: integer, notnull: false } street: { type: string(255), notnull: true } street_code: { type: integer, notnull: false } usable_area: { type: integer, notnull: false } estate_area: { type: integer, notnull: false } floor_number: { type: integer, notnull: false } sreality_id: { type: integer, notnull: false } synch_sreality: { type: boolean, notnull: true, default: true } reals_id: { type: integer, notnull: false } synch_reals: { type: boolean, notnull: true, default: true } is_hidden: { type: boolean, notnull: true, default: false } relations: Category: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: Estates, type: one, foreignType: many } SubCategory: { onDelete: CASCADE, local: sub_category_id, foreign: id, foreignAlias: Estates, type: one, foreignType: many } Type: { onDelete: CASCADE, local: type_id, foreign: id, foreignAlias: Estates, type: one, foreignType: many } ChangeUser: { onDelete: CASCADE, class: sfGuardUser, local: change_user_id, foreign: id, foreignAlias: Estates, type: one, foreignType: many } BrokerUser: { onDelete: CASCADE, class: sfGuardUser, local: broker_user_id, foreign: id, foreignAlias: Estates, type: one, foreignType: many } BuildingType: { onDelete: CASCADE, local: building_type_id, foreign: id, foreignAlias: Estates, type: one, foreignType: many } BuildingCondition: { onDelete: CASCADE, local: building_condition_id, foreign: id, foreignAlias: Estates, type: one, foreignType: many } ObjectType: { onDelete: CASCADE, local: object_type_id, foreign: id, foreignAlias: Estates, type: one, foreignType: many } PriceUnit: { onDelete: CASCADE, local: price_unit_id, foreign: id, foreignAlias: Estates, type: one, foreignType: many } Ownership: { onDelete: CASCADE, local: ownership_id, foreign: id, foreignAlias: Estates, type: one, foreignType: many } Type: actAs: Sluggable: fields: [name] unique: true builder: ['saInflector', 'urlize'] columns: name: { type: string(255), notnull: true } reals_id: { type: integer, notnull: false } Category: actAs: Sluggable: fields: [name] unique: true builder: ['saInflector', 'urlize'] columns: parent_id: { type: integer, notnull: false } name: { type: string(255), notnull: true } reals_id: { type: integer, notnull: false } relations: Parent: { onDelete: CASCADE, class: Category, local: parent_id, foreign: id, foreignAlias: Children, type: one, foreignType: many } SubCategory: columns: category_id: { type: integer, notnull: false } name: { type: string(255), notnull: true } reals_id: { type: integer, notnull: false } relations: Category: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: SubCategories, type: one, foreignType: many } BuildingType: columns: name: { type: string(255), notnull: true } reals_id: { type: integer, notnull: false } BuildingCondition: columns: name: { type: string(255), notnull: true } ObjectType: columns: name: { type: string(255), notnull: true } PriceUnit: columns: name: { type: string(255), notnull: true } reals_id: { type: integer, notnull: false } Ownership: columns: name: { type: string(255), notnull: true } Image: actAs: Timestampable: ~ columns: estate_id: { type: integer, notnull: true } filename: { type: string(255), notnull: true } sreality_id: { type: integer, notnull: false } is_main: { type: boolean, notnull: true, default: false } relations: Estate: { onDelete: CASCADE, local: estate_id, foreign: id, foreignAlias: Images, type: one, foreignType: many } Attach: actAs: Timestampable: ~ columns: estate_id: { type: integer, notnull: true } name: { type: string(255), notnull: true } type: { type: string(255), notnull: true } filename: { type: string(255), notnull: true } relations: Estate: { onDelete: CASCADE, local: estate_id, foreign: id, foreignAlias: Attachs, type: one, foreignType: many } Demand: actAs: Timestampable: ~ columns: estate_id: { type: integer, notnull: false } estate_name: { type: string(255), notnull: true } is_complet: { type: boolean, default: false, notnull: false} customer: { type: string(255), notnull: true } tel: { type: string(255), notnull: true } email: { type: string(255), notnull: true } text: { type: clob } relations: Estate: { onDelete: SET NULL, local: estate_id, foreign: id, foreignAlias: Demands, type: one, foreignType: many } Page: actAs: Timestampable: ~ Sluggable: fields: [title] unique: true builder: ['saInflector', 'urlize'] columns: title: { type: string(255), notnull: true } text: { type: clob } is_deletable: { type: boolean, notnull: false, default: true } sfGuardUser: columns: sreality_id: { type: integer, notnull: false }