123456789101112131415161718192021222324252627282930313233343536373839404142 |
- -- Active: xiaoding_test@@192.168.110.85@3306@xiaoding_test
- /* 项目列表视图 */
- DROP VIEW IF EXISTS manage_project_list;
- CREATE OR REPLACE VIEW manage_project_list AS
- SELECT p.id /* 项目编号 */, p.title /* 项目名称 */, pc.name /* 项目分类名称 */, p.price /* 项目价格 */, p.duration /* 服务时长(分钟) */, p.state /* 状态 */, p.cover /* 项目封面图片 */
- FROM
- project p /* 项目表 */
- LEFT JOIN project_cate pc /* 项目分类表 */ ON p.cate_id = pc.id
- AND pc.deleted_at IS NULL
- WHERE
- p.deleted_at IS NULL
- ORDER BY p.id DESC;
- /* 项目管理列表视图 */
- DROP VIEW IF EXISTS v_project_manage;
- CREATE VIEW v_project_manage AS
- SELECT
- p.id AS id /* 项目ID */,
- p.cover AS cover /* 项目封面图片 */,
- p.cate_id AS cate_id /* 项目分类ID */,
- p.title AS title /* 项目名称 */,
- p.subtitle AS subtitle /* 项目副标题 */,
- p.price AS price /* 项目价格 */,
- p.original_price AS original_price /* 项目原价 */,
- p.sales AS sales /* 项目虚拟销量 */,
- p.duration AS duration /* 服务时长(分钟) */,
- p.project_desc AS project_desc /* 项目描述 */,
- p.service_desc AS service_desc /* 服务描述 */,
- p.`type` AS `type` /* 项目类型 */,
- p.state AS state /* 项目状态 */,
- p.service_posture AS service_posture /* 服务姿态 */,
- p.service_process AS service_process /* 服务流程 */,
- p.suitable_population AS suitable_population /* 适用人群 */,
- p.taboo_symptoms AS taboo_symptoms /* 禁忌症状 */
- FROM project p
- WHERE
- p.deleted_at IS NULL;
|