--- options: collate: utf8_czech_ci charset: utf8 Profile: actAs: Timestampable: ~ Sluggable: fields: [name] unique: true builder: ['saInflector', 'urlize'] columns: user_id: { type: integer, notnull: true } type_id: { type: integer, notnull: true } name: { type: string(255) } first_name: { type: string(255) } last_name: { type: string(255) } prefix: { type: string(255) } sufix: { type: string(255) } tel: { type: string(255) } mail: { type: string(255), notnull: true } web: { type: string(255) } country_id: { type: integer, notnull: true } region_id: { type: integer, notnull: false } city: { type: string(255) } street: { type: string(255) } zip: { type: integer } ic: { type: string(255) } bank_account: { type: string(255) } text: { type: clob } is_public: { type: boolean, notnull: true, default: true } prepayment_type_id: { type: integer, notnull: true, default: 1 } prepayment_from: { type: date } prepayment_to: { type: date } prepayment_active: { type: boolean, notnull: false, default: false } filename: { type: string(255) } representant_id: { type: integer } is_pdf_subscriber: { type: boolean, notnull: true, default: false } is_eventer: { type: boolean, notnull: true, default: false } relations: User: { class: sfGuardUser, onDelete: CASCADE, local: user_id, foreign: id, foreignAlias: Profile, type: one, foreignType: one } ProfileType: { onDelete: CASCADE, local: type_id, foreign: id, foreignAlias: Profiles, type: one, foreignType: many } PrepaymentType: { onDelete: CASCADE, local: prepayment_type_id, foreign: id, foreignAlias: Profiles, type: one, foreignType: many } Region: { onDelete: CASCADE, local: region_id, foreign: id, foreignAlias: Jobs, type: one, foreignType: many } Country: { onDelete: CASCADE, local: country_id, foreign: id, foreignAlias: Profiles, type: one, foreignType: many } Representant: { onDelete: SET NULL, local: representant_id, foreign: id, foreignAlias: Profiles, type: one, foreignType: many } ProfileType: columns: name: { type: string(255), notnull: true } PrepaymentType: columns: name: { type: string(255), notnull: true } PrepaymentCount: columns: profile_id: { type: integer, notnull: true } style_id: { type: integer, notnull: true } count: { type: integer, notnull: true, default: 0 } discount: { type: float, notnull: true, default: 1 } request_count: { type: integer, notnull: true, default: 0 } request_discount: { type: float, notnull: true, default: 1 } rows: { type: integer, notnull: true, default: 0 } rows_discount: { type: float, notnull: true, default: 1 } request_rows: { type: integer, notnull: true, default: 0 } relations: Profile: { onDelete: CASCADE, local: profile_id, foreign: id, foreignAlias: PrepaymentCounts, type: one, foreignType: many } JobStyle: { onDelete: CASCADE, local: style_id, foreign: id, foreignAlias: PrepaymentCounts, type: one, foreignType: many } Job: actAs: Timestampable: ~ Sluggable: fields: [name] unique: true builder: ['saInflector', 'urlize'] columns: profile_id: { type: integer, notnull: false } category_id: { type: integer, notnull: true } type_id: { type: integer, notnull: true } style_id: { type: integer, notnull: true } country_id: { type: integer, notnull: true } name: { type: string(255), notnull: true } city: { type: string(255), notnull: false } street: { type: string(255), notnull: false } zip: { type: integer, notnull: false } text: { type: clob } valid_from: { type: date, notnull: true } valid_months: { type: integer, notnull: true, default: 1 } valid_to: { type: date, notnull: true } is_active: { type: boolean, notnull: true, default: false } price: { type: float, notnull: true, default: 0 } discount: { type: float, notnull: true, default: 1 } prepayment_rows: { type: integer, notnull: true, default: 0 } relations: Profile: { onDelete: CASCADE, local: profile_id, foreign: id, foreignAlias: Jobs, type: one, foreignType: many } JobCategory: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: Jobs, type: one, foreignType: many } JobType: { onDelete: CASCADE, local: type_id, foreign: id, foreignAlias: Jobs, type: one, foreignType: many } JobStyle: { onDelete: CASCADE, local: style_id, foreign: id, foreignAlias: Jobs, type: one, foreignType: many } Country: { onDelete: CASCADE, local: country_id, foreign: id, foreignAlias: Jobs, type: one, foreignType: many } Specializations: { class: JobSpecialization, foreignAlias: Jobs, refClass: JobSpecializationRelation, local: job_id, foreign: specialization_id } Regions: { class: Region, foreignAlias: Jobs, refClass: JobRegionRelation, local: job_id, foreign: region_id, type: many, foreignType: many } TopJob: actAs: Timestampable: ~ columns: job_id: { type: integer, notnull: false } is_active: { type: boolean, notnull: false, default: false } valid_from: { type: date, notnull: false } valid_to: { type: date, notnull: false } relations: Job: { onDelete: CASCADE, local: job_id, foreign: id, foreignAlias: TopJob, type: one, foreignType: one } JobCategory: actAs: Timestampable: ~ Sluggable: fields: [name] unique: true builder: ['saInflector', 'urlize'] columns: parent_id: { type: integer, notnull: false } name: { type: string(255), notnull: true } priority: { type: integer, notnull: true, default: 100 } relations: Parent: {class: JobCategory, onDelete: CASCADE, local: parent_id, foreign: id, foreignAlias: Children, type: one, foreignType: many } JobSpecialization: columns: category_id: { type: integer, notnull: true } name: { type: string(255), notnull: true } priority: { type: integer, notnull: true, default: 100 } relations: JobCategory: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: Specializations, type: one, foreignType: many } JobSpecializationRelation: columns: job_id: { type: integer, primary: true } specialization_id: { type: integer, primary: true } relations: Job: { onDelete: CASCADE, local: job_id, foreign: id, foreignAlias: JobSpecializationRelations, type: one, foreignType: many } Specialization: { class: JobSpecialization, onDelete: CASCADE, local: specialization_id, foreign: id, foreignAlias: JobSpecializationRelations, type: one, foreignType: many } JobRegionRelation: columns: job_id: { type: integer, primary: true } region_id: { type: integer, primary: true } relations: Job: { onDelete: CASCADE, local: job_id, foreign: id, foreignAlias: JobRegionRelations, type: one, foreignType: many } Region: { onDelete: CASCADE, local: region_id, foreign: id, foreignAlias: JobRegionRelations, type: one, foreignType: many } JobType: columns: name: { type: string(255), notnull: true } JobStyle: columns: name: { type: string(255), notnull: true } 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 } Region: actAs: Sluggable: fields: [name] unique: true builder: ['saInflector', 'urlize'] columns: name: { type: string(255) } priority: { type: integer, notnull: true, default: 100 } coords: { type: clob } Banner: actAs: Timestampable: ~ columns: type_id: { type: integer, notnull: true } profile_id: { type: integer, notnull: false } filename: { type: string(255) } note: { type: string(255) } limit_from: { type: date } limit_to: { type: date } limit_clicks: { type: integer } limit_views: { type: integer } clicks_count: { type: integer, notnull: false, default: 0 } views_count: { type: integer, notnull: false, default: 0 } is_active: { type: boolean, notnull: true, default: true } last_show: { type: datetime, notnull: false } show_token: { type: boolean, notnull: frue, default: false } relations: Type: { class: BannerType, onDelete: CASCADE, local: type_id, foreign: id, foreignAlias: Banners, type: one, foreignType: many } Regions: { class: Region, foreignAlias: Banners, refClass: BannerRegionRelation, local: banner_id, foreign: region_id, type: many, foreignType: many } Profile: { onDelete: CASCADE, local: profile_id, foreign: id, foreignAlias: Banners, type: one, foreignType: many } BannerRegionRelation: columns: banner_id: { type: integer, primary: true } region_id: { type: integer, primary: true } relations: Banner: { onDelete: CASCADE, local: banner_id, foreign: id, foreignAlias: BannerRegionRelations, type: one, foreignType: many } Region: { onDelete: CASCADE, local: region_id, foreign: id, foreignAlias: BannerRegionRelations, type: one, foreignType: many } BannerType: columns: name: { type: string(255) } width: { type: integer } height: { type: integer } BannerClick: actAs: Timestampable: updated: disabled: true columns: banner_id: { type: integer, notnull: true } ip: { type: string(255) } url: { type: string(255) } user_agent: { type: string(255) } relations: Banner: { onDelete: CASCADE, local: banner_id, foreign: id, foreignAlias: Clicks, type: one, foreignType: many } #PrepaymentCountPrice: # actAs: # Timestampable: ~ # columns: # count_min: { type: integer, notnull: true } # price_one: { type: integer, notnull: true } # #TopJobPrice: # actAs: # Timestampable: ~ # columns: # days_min: { type: integer, notnull: true } # price_day: { type: integer, notnull: true } Invoice: actAs: Timestampable: ~ columns: number: { type: integer, notnull: true, unique: true } profile_id: { type: integer } supplier_name: { type: string(255) } supplier_ic: { type: string(255) } supplier_dic: { type: string(255) } supplier_street: { type: string(255) } supplier_city: { type: string(255) } supplier_zip: { type: string(255) } subscriber_name: { type: string(255) } subscriber_ic: { type: string(255) } subscriber_dic: { type: string(255) } subscriber_street: { type: string(255) } subscriber_city: { type: string(255) } subscriber_zip: { type: string(255) } maturity_date: { type: date, notnull: true} payment_form: { type: string(255) } bank: { type: string(255) } account: { type: string(255) } is_paid: { type: boolean, notnull: true, default: false } relations: Profile: { onDelete: SET NULL, local: profile_id, foreign: id, foreignAlias: Invoices, type: one, foreignType: many } InvoiceItem: columns: invoice_id: { type: integer, notnull: true } job_id: { type: integer } topjob_id: { type: integer } banner_id: { type: integer } profile_id: { type: integer } text: { type: clob } amount: { type: integer, notnull: true, default: 1 } price_one: { type: float, notnull: true, default: 0 } currency: { type: char(3), notnull: false } dph: { type: integer, notnull: true, default: 20 } relations: Invoice: { onDelete: CASCADE, local: invoice_id, foreign: id, foreignAlias: Items, type: one, foreignType: many } Job: { onDelete: SET NULL, local: job_id, foreign: id, foreignAlias: InoiceItems, type: one, foreignType: many } TopJob: { onDelete: SET NULL, local: topjob_id, foreign: id, foreignAlias: InvoiceItems, type: one, foreignType: many } Banner: { onDelete: SET NULL, local: banner_id, foreign: id, foreignAlias: InvoiceItems, type: one, foreignType: many } Profile: { onDelete: SET NULL, local: profile_id, foreign: id, foreignAlias: InvoiceItems, type: one, foreignType: many } Country: columns: name: { type: string(255) } JobStylePrice: columns: country_id: { type: integer, notnull: true } style_id: { type: integer, notnull: true } currency: { type: char(3), notnull: false } row_price: { type: float, notnull: true, default: 0 } relations: Country: { onDelete: CASCADE, local: country_id, foreign: id, foreignAlias: Prices, type: one, foreignType: many } JobStyle: { onDelete: CASCADE, local: style_id, foreign: id, foreignAlias: Prices, type: one, foreignType: many } Representant: actAs: Timestampable: ~ columns: first_name: { type: string(255) } last_name: { type: string(255) } Subscriber: actAs: Timestampable: ~ columns: profile_id: { type: integer, notnull: false } name: { type: string(255) } email: { type: string(255), notnull: true, unique: true } relations: Profile: { onDelete: CASCADE, local: profile_id, foreign: id, foreignAlias: Subscribers, type: one, foreignType: many } Bulletin: actAs: Timestampable: ~ columns: subject: { type: string(255), notnull: true } content: { type: clob } note: { type: clob } subscribers_num: { type: integer } is_planned: { type: boolean, notnull: true, default: false } planned_date: { type: date } send_date: { type: timestamp } filename: { type: string(255) } Event: actAs: Timestampable: ~ columns: profile_id: { type: integer, notnull: false } name: { type: string(255), notnull: true } perex: { type: clob } text: { type: clob } contact: { type: string(255) } logo: { type: string(255) } date_from: { type: timestamp, notnull: true } date_to: { type: timestamp, notnull: true } region_id: { type: integer, notnull: true } city: { type: string(255) } relations: Profile: { onDelete: CASCADE, local: profile_id, foreign: id, foreignAlias: Subscribers, type: one, foreignType: many } Region: { onDelete: CASCADE, local: region_id, foreign: id, foreignAlias: Events, type: one, foreignType: many } Categories: { class: JobCategory, foreignAlias: Events, refClass: EventCategoryRelation, local: event_id, foreign: category_id, type: many, foreignType: many } EventCategoryRelation: columns: event_id: { type: integer, primary: true } category_id: { type: integer, primary: true } relations: Event: { onDelete: CASCADE, local: event_id, foreign: id, foreignAlias: EventCategoryRelations, type: one, foreignType: many } JobCategory: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: EventCategoryRelations, type: one, foreignType: many }