-- auto-generated definition
create table dbo.PHTGL_ContractTrack
(
    Id                                   varchar(50) not null
        constraint PK_PHTGL_ContractTrack
            primary key,
    ContractNum                          varchar(50),
    MainItemCode                         varchar(50),
    MainItemName                         varchar(50),
    MajorName                            varchar(50),
    MajorCode                            varchar(50),
    SubProject                           varchar(50),
    SubItemProject                       varchar(50),
    ProjectCode                          varchar(255),
    ProjectName                          varchar(255),
    ProjectDescription                   varchar(255),
    UnitOfMeasurement                    varchar(50),
    Quantity                             varchar(50),
    TotalCostFixedComprehensiveUnitPrice varchar(50),
    MainMaterialCost                     varchar(50),
    TotalPrice                           varchar(50),
    CalculationRule                      varchar(255),
    WorkContent                          varchar(max),
    Remarks                              varchar(max),
    ConstructionSubcontractor            varchar(50),
    ContractWeight                       varchar(50),
    MaterialSupplier                     varchar(50),
    IsWithinGeneralContractScope         bit,
    EstimatedQuantity                    varchar(50),
    EstimatedAmount                      decimal,
    SettledQuantity                      varchar(50),
    SettledAmount                        decimal,
    ContractId                           varchar(50),
    ProjectId                            varchar(50)
)
go

exec sp_addextendedproperty 'MS_Description', N'合同执行跟踪表', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack'
go

exec sp_addextendedproperty 'MS_Description', N'施工分包合同编号', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack',
     'COLUMN', 'ContractNum'
go

exec sp_addextendedproperty 'MS_Description', N'主项号', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'MainItemCode'
go

exec sp_addextendedproperty 'MS_Description', N'主项名称', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'MainItemName'
go

exec sp_addextendedproperty 'MS_Description', N'专业工程名称', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack',
     'COLUMN', 'MajorName'
go

exec sp_addextendedproperty 'MS_Description', N'专业代码', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'MajorCode'
go

exec sp_addextendedproperty 'MS_Description', N'分部工程', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'SubProject'
go

exec sp_addextendedproperty 'MS_Description', N'分项工程', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'SubItemProject'
go

exec sp_addextendedproperty 'MS_Description', N'项目编码', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'ProjectCode'
go

exec sp_addextendedproperty 'MS_Description', N'项目名称', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'ProjectName'
go

exec sp_addextendedproperty 'MS_Description', N'项目特征描述', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack',
     'COLUMN', 'ProjectDescription'
go

exec sp_addextendedproperty 'MS_Description', N'计量单位', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'UnitOfMeasurement'
go

exec sp_addextendedproperty 'MS_Description', N'工程量', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'Quantity'
go

exec sp_addextendedproperty 'MS_Description', N'全费用固定综合单价', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack',
     'COLUMN', 'TotalCostFixedComprehensiveUnitPrice'
go

exec sp_addextendedproperty 'MS_Description', N'主材费', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'MainMaterialCost'
go

exec sp_addextendedproperty 'MS_Description', N'合价/元', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'TotalPrice'
go

exec sp_addextendedproperty 'MS_Description', N'计算规则', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'CalculationRule'
go

exec sp_addextendedproperty 'MS_Description', N'工作内容', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'WorkContent'
go

exec sp_addextendedproperty 'MS_Description', N'备注', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'Remarks'
go

exec sp_addextendedproperty 'MS_Description', N'施工分包商', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'ConstructionSubcontractor'
go

exec sp_addextendedproperty 'MS_Description', N'合同权重 ', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'ContractWeight'
go

exec sp_addextendedproperty 'MS_Description', N'主材供应方 ', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'MaterialSupplier'
go

exec sp_addextendedproperty 'MS_Description', N'是否总包合同范围内', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack',
     'COLUMN', 'IsWithinGeneralContractScope'
go

exec sp_addextendedproperty 'MS_Description', N'概算工程量', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'EstimatedQuantity'
go

exec sp_addextendedproperty 'MS_Description', N'概算金额', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'EstimatedAmount'
go

exec sp_addextendedproperty 'MS_Description', N'结算工程量', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'SettledQuantity'
go

exec sp_addextendedproperty 'MS_Description', N'结算金额 ', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrack', 'COLUMN',
     'SettledAmount'
go

-- auto-generated definition
create table dbo.PHTGL_ContractTrackMatchWBS
(
    Id                    varchar(50) not null
        constraint PHTGL_ContractTrackMatchWBS_pk
            primary key,
    ContractTrackId       int,
    ControlItemAndCycleId varchar(50),
    WorkPackageEstimate   decimal
)
go

exec sp_addextendedproperty 'MS_Description', N'合同执行跟踪匹配wbs子表', 'SCHEMA', 'dbo', 'TABLE',
     'PHTGL_ContractTrackMatchWBS'
go

exec sp_addextendedproperty 'MS_Description', N'主键id', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrackMatchWBS',
     'COLUMN', 'Id'
go

exec sp_addextendedproperty 'MS_Description', N'合同执行跟踪表id', 'SCHEMA', 'dbo', 'TABLE',
     'PHTGL_ContractTrackMatchWBS', 'COLUMN', 'ContractTrackId'
go

exec sp_addextendedproperty 'MS_Description', N'WBS工作包控制项定制表id', 'SCHEMA', 'dbo', 'TABLE',
     'PHTGL_ContractTrackMatchWBS', 'COLUMN', 'ControlItemAndCycleId'
go

exec sp_addextendedproperty 'MS_Description', N'工作包概算', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrackMatchWBS',
     'COLUMN', 'WorkPackageEstimate'
go

-- auto-generated definition
create table dbo.PHTGL_ContractTrackProgress
(
    ContractTrackProgressId varchar(50) not null
        constraint PHTGL_ContractTrackProgress_pk
            primary key,
    ContractTrackId         varchar(50),
    BCWS_Quantity           nvarchar(50),
    BCWS_OutputValue        nvarchar(50),
    BCWS_Percentage         nvarchar(50),
    ACWP_Quantity           nvarchar(50),
    ACWP_OutputValue        nvarchar(50),
    ACWP_Percentage         nvarchar(50)
)
go

exec sp_addextendedproperty 'MS_Description', N'合同执行跟踪进展情况子表', 'SCHEMA', 'dbo', 'TABLE',
     'PHTGL_ContractTrackProgress'
go

exec sp_addextendedproperty 'MS_Description', N'合同跟踪表主键', 'SCHEMA', 'dbo', 'TABLE',
     'PHTGL_ContractTrackProgress', 'COLUMN', 'ContractTrackId'
go

exec sp_addextendedproperty 'MS_Description', N'BCWS工程量', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrackProgress',
     'COLUMN', 'BCWS_Quantity'
go

exec sp_addextendedproperty 'MS_Description', N'BCWS产值', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrackProgress',
     'COLUMN', 'BCWS_OutputValue'
go

exec sp_addextendedproperty 'MS_Description', N'BCWS百分比', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrackProgress',
     'COLUMN', 'BCWS_Percentage'
go

exec sp_addextendedproperty 'MS_Description', N'ACWP工程量', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrackProgress',
     'COLUMN', 'ACWP_Quantity'
go

exec sp_addextendedproperty 'MS_Description', N'ACWP产值 ', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrackProgress',
     'COLUMN', 'ACWP_OutputValue'
go

exec sp_addextendedproperty 'MS_Description', N'ACWP百分比 ', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_ContractTrackProgress',
     'COLUMN', 'ACWP_Percentage'
go

